package com.kuwou.workobject.controller;

import com.kuwou.workobject.pojo.vo.CommentVo;
import com.kuwou.workobject.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/comment")
public class CommentController {

    @Autowired
    private CommentService commentService;

    @GetMapping("/getRankListComment/{rankListId}")
    public List<CommentVo> getRankListComment(@PathVariable int rankListId){
        return commentService.getRankListComment(rankListId);
    }
}
